{php}
    $_temps = explode(PHP_EOL,\ebcms\Func::streol($field['config']['values']));
    $field['config']['editable'] = isset($field['config']['editable'])?$field['config']['editable']:0;
{/php}
{eq name='field.config.editable' value='1'}
    <table class="table" style="margin-bottom: 0px;">
        <tr>
            <td style="padding: 0px !important;">
                <input type="text" class="form-control" id="{$field.unique}_obj" name="{$field.field}" value="{$field.value}" placeholder="{$field.config.prompt|default=''}" {eq name='field.config.readonly' value='1'} readonly{/eq} {eq name='field.config.disabled' value='1'} disabled{/eq}>
            </td>
            <td style="width: 150px;padding: 0px 0px 0px 10px !important;">
                <select class="form-control" id="{$field.unique}" onchange="$('#{$field.unique}_obj').val($(this).val());" {eq name='field.config.readonly' value='1'} readonly{/eq} {eq name='field.config.disabled' value='1'} disabled{/eq}>
                    {foreach name='_temps' item='_temp'}
                    {php}$_temp = explode("|",$_temp);{/php}
                    <option value="{$_temp[1]}" {eq name="field.value" value='$_temp[1]'}selected{/eq}>{$_temp[0]}</option>
                    {/foreach}
                </select>
            </td>
        </tr>
    </table>
{else/}
    <select class="form-control" id="{$field.unique}" name="{$field.field}" {eq name='field.config.readonly' value='1'} readonly{/eq} {eq name='field.config.disabled' value='1'} disabled{/eq}>
        {foreach name='_temps' item='_temp'}
        {php}$_temp = explode("|",$_temp);{/php}
        <option value="{$_temp[1]}" {eq name="field.value" value='$_temp[1]'}selected{/eq}>{$_temp[0]}</option>
        {/foreach}
    </select>
{/eq}